package com.thinkTank.oa.entity;

import java.io.Serializable;
import java.util.Map;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.alibaba.fastjson.JSONObject;



/**
 * 对接详情
 * @author 董力
 * 2018-08-13
 */
public class ButtDetails implements Serializable{

	
	JSONObject obj =(JSONObject)JSONObject.parse(this.getRemark1());
	
	private static final long serialVersionUID = 1L;

	/**唯一标识 */
	private String pid; 
	/**外键/项目id*/
	private String projectNumber;
	/**外键/需求id*/
	private String demandNumber;
	/**外键/会议活动id*/
	private String conferenceNumber;
	/**外键/专家id*/
	private String expertNumber;
	/**外键/客户id*/
	private String customerNumber; 
	/**
	 * 对接状态
	 * 1沟通对接需求 2已签合作协议 3执行对接任务 4完成对接需求
	 */
	@NotNull(message = "对接状态不能为空")
	private Integer buttStatus;
	
	//展示用
	private String buttStatusStr;
	
	//展示用（项目Number）
	private String projectNum;
	
	//展示用（项目类型）
	private String projectType;
		
	/**对接时间*/
	@NotEmpty(message="对接时间不能为空")
	private String buttDataTime; 
	
	private String addDateTime;
	/**对接附件*/
	private String buttaNnex;
	/**对接详情*/
	@NotEmpty(message="对接详情不能为空")
	private String buttDetails; 
	/**对接负责人*/
	private String buttPersonId; 
	/**future 1表示最新，0不是最新*/
	private Integer future;
	/**备注1*/
	private String remark1; 
	/**备注2*/
	private String remark2;
	
	
	
	/**
	 * 需求标题
	 */
	private String demandName;
	
	/**
	 * 项目标题
	 */
	private String projectName;
	
	/**
	 * 客户标题
	 */
	private String customerName;
	
	/**
	 * 专家姓名
	 */
	private String expertName;
	/**
	 * 会议名称
	 */
	private String confName;
	
	/**
	 * 对接人姓名
	 */
	private String buttName;
	
	/**
	 * 查询对接详情使用，如projectNumberEmpty是false时，在sql中
	 * 表现为projectNumber is not null
	 */
	private boolean projectNumberEmpty = true;
	private boolean demandNumberEmpty = true;
	private boolean customerNumberEmpty = true;
	private boolean expertNumberEmpty = true;
	private boolean conferenceNumberEmpty = true;
	//用于查询
	private String beginDate;
	private String endDate; 
	/**
	 * 状态的字符串值
	 */
	private String buttStatusWorth;
	
	private String[] inButtDetails;
	
	public String getExpertName() {
	
		return expertName;
	}
	public void setExpertName(String expertName) {
		
		this.expertName = expertName;
	}
	public String getConfName() {
		return confName;
	}
	public void setConfName(String confName) {
		this.confName = confName;
	}
	public String getButtName() {
		return buttName;
	}
	public void setButtName(String buttName) {
	
		this.buttName = buttName;
	}
	public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public String getProjectNumber() {
		return projectNumber;
	}
	public void setProjectNumber(String projectNumber) {
		this.projectNumber = projectNumber;
	}
	public String getDemandNumber() {
		return demandNumber;
	}
	public void setDemandNumber(String demandNumber) {
		this.demandNumber = demandNumber;
	}
	public String getConferenceNumber() {
		return conferenceNumber;
	}
	public void setConferenceNumber(String conferenceNumber) {
		this.conferenceNumber = conferenceNumber;
	}
	public String getExpertNumber() {
		return expertNumber;
	}
	public void setExpertNumber(String expertNumber) {
		this.expertNumber = expertNumber;
	}
	public String getCustomerNumber() {
		return customerNumber;
	}
	public void setCustomerNumber(String customerNumber) {
		this.customerNumber = customerNumber;
	}
	public Integer getButtStatus() {
		return buttStatus;
	}
	public void setButtStatus(Integer buttStatus) {
		this.buttStatus = buttStatus;
	}
	public String getButtDataTime() {
		return buttDataTime;
	}
	public void setButtDataTime(String buttDataTime) {
		this.buttDataTime = buttDataTime;
	}
	public String getButtaNnex() {
		return buttaNnex;
	}
	public void setButtaNnex(String buttaNnex) {
		this.buttaNnex = buttaNnex;
	}
	public String getButtDetails() {
		return buttDetails;
	}
	public void setButtDetails(String buttDetails) {
		this.buttDetails = buttDetails;
	}
	public String getButtPersonId() {
		return buttPersonId;
	}
	public void setButtPersonId(String buttPersonId) {
		this.buttPersonId = buttPersonId;
	}
	public Integer getFuture() {
		return future;
	}
	public void setFuture(Integer future) {
		this.future = future;
	}
	public String getRemark1() {
	
		return remark1;
	}
	public static void main(String[] args) {
		JSONObject obj =(JSONObject)JSONObject.parse("{demandId:'D200019',demandName:'md',expertId:'E20000',expertName:'11'}");
		//System.out.println(obj.get("expertName"));
	}
	public void setRemark1(String remark1) {
		JSONObject obj =(JSONObject)JSONObject.parse(remark1);
		if(obj.get("projectName")!=null){
			this.setProjectName("项目:"+obj.get("projectName").toString());
		}
		if(obj.get("demandName")!=null){
			this.setDemandName("需求:"+obj.getString("demandName"));
		}
		if(obj.get("confTitle")!=null){
			this.setConfName("会议:"+obj.getString("confTitle"));
		}
		if(obj.get("customerName")!=null){
			this.setCustomerName("客户:"+obj.getString("customerName"));
		}
		if(obj.get("expertName")!=null){
			this.setExpertName("专家:"+obj.getString("expertName"));
		}
		
		
		this.remark1 = remark1;
	}
	public String getRemark2() {
		return remark2;
	}
	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}
	public String getAddDateTime() {
		return addDateTime;
	}
	public void setAddDateTime(String addDateTime) {
		this.addDateTime = addDateTime;
	}
	public String getDemandName() {
		return demandName;
	}
	public void setDemandName(String demandName) {
		this.demandName = demandName;
	}
	public String getProjectName() {
		return projectName;
	}
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	public String getCustomerName() {
		return customerName;
	}
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
    public boolean isProjectNumberEmpty() {
        return projectNumberEmpty;
    }
    public void setProjectNumberEmpty(boolean projectNumberEmpty) {
        this.projectNumberEmpty = projectNumberEmpty;
    }
    public boolean isDemandNumberEmpty() {
        return demandNumberEmpty;
    }
    public void setDemandNumberEmpty(boolean demandNumberEmpty) {
        this.demandNumberEmpty = demandNumberEmpty;
    }
    public boolean isCustomerNumberEmpty() {
        return customerNumberEmpty;
    }
    public void setCustomerNumberEmpty(boolean customerNumberEmpty) {
        this.customerNumberEmpty = customerNumberEmpty;
    }
    public boolean isExpertNumberEmpty() {
        return expertNumberEmpty;
    }
    public void setExpertNumberEmpty(boolean expertNumberEmpty) {
        this.expertNumberEmpty = expertNumberEmpty;
    }
    public boolean isConferenceNumberEmpty() {
        return conferenceNumberEmpty;
    }
    public void setConferenceNumberEmpty(boolean conferenceNumberEmpty) {
        this.conferenceNumberEmpty = conferenceNumberEmpty;
    }
    public String getButtStatusWorth() {
        return buttStatusWorth;
    }
    public void setButtStatusWorth(String buttStatusWorth) {
        this.buttStatusWorth = buttStatusWorth;
    }
	public String getButtStatusStr() {
		return buttStatusStr;
	}
	public void setButtStatusStr(String buttStatusStr) {
		this.buttStatusStr = buttStatusStr;
	}
	public String[] getInButtDetails() {
		return inButtDetails;
	}
	public void setInButtDetails(String[] inButtDetails) {
		this.inButtDetails = inButtDetails;
	}
	public String getProjectNum() {
		return projectNum;
	}
	public void setProjectNum(String projectNum) {
		this.projectNum = projectNum;
	}
	public String getProjectType() {
		return projectType;
	}
	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}
	public String getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}
	public String getEndDate() {
		return endDate;
	}
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	
}
